package cn.stylefeng.guns.modular.basic.service;

import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo;
import cn.stylefeng.guns.modular.basic.entity.BasicCustomer;
import cn.stylefeng.guns.modular.basic.model.params.BasicCustomerParam;
import cn.stylefeng.guns.modular.basic.model.result.BasicCustomerResult;
import cn.stylefeng.guns.modular.basic.model.result.JHZYJDResult;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * 客户表 服务类
 */
public interface BasicCustomerService extends IService<BasicCustomer> {

    /**
     * 新增
     *
     * @author zhucx
     * @Date 2019-06-21
     */
    void add(BasicCustomerParam param);

    /**
     * 删除
     *
     * @author zhucx
     * @Date 2019-06-21
     */
    void delete(BasicCustomerParam param);

    /**
     * 更新
     *
     * @author zhucx
     * @Date 2019-06-21
     */
    void update(BasicCustomerParam param);

    /**
     * 查询单条数据，Specification模式
     *
     * @author zhucx
     * @Date 2019-06-21
     */
    BasicCustomerResult findBySpec(BasicCustomerParam param,Long operateId);

    /**
     * 查询列表，Specification模式
     *
     * @author zhucx
     * @Date 2019-06-21
     */
    List<BasicCustomerResult> findListBySpec(BasicCustomerParam param,Long operateId);

    /**
     * 查询分页数据，Specification模式
     *
     * @author zhucx
     * @Date 2019-06-21
     */
     LayuiPageInfo findPageBySpec(BasicCustomerParam param,String condition,Long operateId);

	List<BasicCustomer> findListByDeptId(Long deptId);

    BasicCustomer findListByStoreIdXlb(String storeIdXlb);

    String findListByWarehouseId(String warehouseId);
	/**
	 * 查询可选择的客户
	 * @param deptId
	 * @param deliverId
	 * @return
	 */
	List<BasicCustomerResult> findAvailableList(Long deptId, Long deliverId,Long operateId);

	List<BasicCustomerResult> findpullStoragetaskXlbListBySpec(BasicCustomerParam param);

    List<BasicCustomerResult> findpullYuyueXlbListBySpec(BasicCustomerParam param);

    List<BasicCustomerResult> findpullReturnXlbListBySpec(BasicCustomerParam param);

    List<BasicCustomerResult> findpullReturnXlbgoodsListBySpec(BasicCustomerParam param);

    List<JHZYJDResult> findJhzyjdListByDeptId(Long deptId, String currentDate);
}
